using 高校员工餐饮信息管理系统.Models;

namespace 高校员工餐饮信息管理系统.Services
{
    /// <summary>
    /// 订单服务接口
    /// </summary>
    public interface IOrderService
    {
        /// <summary>
        /// 创建订单
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="merchantId">商户ID</param>
        /// <param name="totalAmount">总金额</param>
        /// <returns>订单信息</returns>
        Task<Order> CreateOrderAsync(int userId, int merchantId, decimal totalAmount);
        
        /// <summary>
        /// 计算补贴金额
        /// </summary>
        /// <param name="totalAmount">总金额</param>
        /// <param name="userId">用户ID</param>
        /// <returns>补贴金额</returns>
        Task<decimal> CalculateSubsidyAsync(decimal totalAmount, int userId);
        
        /// <summary>
        /// 查询用户订单
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="startDate">开始日期</param>
        /// <param name="endDate">结束日期</param>
        /// <returns>订单列表</returns>
        Task<List<Order>> GetUserOrdersAsync(int userId, DateTime startDate, DateTime endDate);
        
        /// <summary>
        /// 获取订单详情
        /// </summary>
        /// <param name="orderId">订单ID</param>
        /// <returns>订单信息</returns>
        Task<Order?> GetOrderByIdAsync(int orderId);
    }
}

